def tranText(text,shift):
    newStr = ''
    for ch in text:
        if ch.isalpha():
            if 'A'<=ch<='Z':
                base = ord('A')
            else:
                base = ord('a')
            temp = (ord(ch)-base+shift)%26+base
            newStr += chr(temp)
        else:
            newStr += ch
    return newStr

print(tranText('guodongsheng',4))